var GG_ATTACHEditView9ControllerBase = EditView9ControllerBase.extend({
        construct: function(config) {
    if(!config)config={};
    if(!config.appctx)config.appctx='';
    if(!config.containerid)config.containerid='';
    arguments.callee.$.construct.call(this,this.getDefaultCfg(config));
    this.regCodeLists(config);
    this.regUICounters(config);
    this.regUIActions(config);
    this.regUpdatePanels(config);
    this.regControllers(config);
}
,regCodeLists:function(config)
{
     /*附件类型*/
     this.regCodeList(new IBizCodeList({id: 'liteTwo_CLGG_FJLX',datas:[{text:'上传文件',value:'FILE',realtext:'上传文件'},{text:'网页链接',value:'LINK',realtext:'网页链接'}]}));
}
,regUICounters:function(config)
{
}
,regUpdatePanels:function(config)
{
     var me=this;
}
,regControllers:function(config)
{
  var cid=config.containerid;
    if(cid!='')cid=cid+'_';
}
,regUIActions:function(config)
{
}
,getDefaultCfg:function(cfg){
    var me=this;     
    var config={backendurl:cfg.appctx+'/Card/GG_ATTACHEditView9.do?'+'srfcid='+cfg.containerid+'&'
                ,viewurl:'/card/gg_attacheditview9.jsp?'+'srfcid='+cfg.containerid+'&'
               ,ctrls:{form:{}}};
    return  $.extend({},config,cfg);
}  
,onInit:function(){
   arguments.callee.$.onInit.call(this);
   var form=this.getForm();
form.register(new IBizHiddenField({id:this.getCId2()+'M12',name:'srfupdatedate'}));
form.register(new IBizHiddenField({id:this.getCId2()+'M11',name:'srforikey'}));
form.register(new IBizHiddenField({id:this.getCId2()+'M10',name:'srfkey'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Mf',name:'srfmajortext'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Me',name:'srftempmode'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Md',name:'srfuf'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Mc',name:'srfdeid'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Mb',name:'srfsourcekey'}));
form.register(new IBizHiddenField({id:this.getCId2()+'M4',name:'cardid'}));
form.register(new IBizHiddenField({id:this.getCId2()+'Ma',name:'gg_attachid'}));
form.register(new IBizFormGroup({id:this.getCId2()+'M3',name:'group1',titleBarCloseMode:'0',form:form}));
form.register(new IBizHiddenField({id:this.getCId2()+'M4',name:'cardid',form:form}));
form.register(new IBizTextField({id:this.getCId2()+'M5',name:'gg_attachname',form:form}));
form.register(new IBizDropDownListField({id:this.getCId2()+'M6',name:'fjlx',form:form,codelistid:'liteTwo_CLGG_FJLX'}));
form.register(new IBizFileField({id:this.getCId2()+'M7',name:'fj',form:form,uploadLimited:''}));
form.register(new IBizTextField({id:this.getCId2()+'M8',name:'lj',form:form}));
form.register(new IBizTextAreaField({id:this.getCId2()+'M9',name:'bz',form:form,height:200}));

}
,onFormFieldChanged: function (fieldname, field, value) {
   var me=this;
   var form=me.getForm();
   if(fieldname==''|| fieldname=='fjlx'){
var _fjlx=form.getFieldValue('fjlx');
var ret=false;if(IBiz.testCond(_fjlx,'EQ','FILE')){ret=true;}form.setPanelVisible('fj',ret);
}

   if(fieldname==''|| fieldname=='fjlx'){
var _fjlx=form.getFieldValue('fjlx');
var ret=false;if(IBiz.testCond(_fjlx,'EQ','LINK')){ret=true;}form.setPanelVisible('lj',ret);
}

}
});